import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import Paging from '@dfeidao/fd-w000010';


export default async function a009(fd: IFeidaoAiBrowserComponent, e: { page_no: number }) {
	// 分页
	const n = fd.data.node.querySelector<HTMLInputElement>('[data-id="sub_process_des"]');
	const sub_des = n.value;
	const page_no = e.page_no;
	const res = await nodejs('processing-set/zj-000003/s001', {
		filter: {
			page_no,
			sub_process_des: sub_des,
			sub_process_no: '',
		}
	});
	render(fd, res, p001, 'p001', 'inner');

	//点击页码数时页码随之改变
	const p = fd.data.node.querySelector<Paging>('[data-id="paging"]')
	p.setAttribute('page-no', page_no + '');
}
